package service

import "errors"

type IUserService interface {
	GetName(userId int) string
	DelName(userId int) error
}

type UserService struct{}

func (this UserService) GetName(userId int) string {
	if userId == 101 {
		return "zw"
	}
	return "no"
}

func (this UserService) DelName(userId int) error {
	if userId != 101 {
		return errors.New("无权限")
	}
	return nil
}
